#! /usr/bin/env python

from re import sub
import rospy
from std_msgs.msg import String


def doMsg(msg):
    rospy.loginfo("收到订阅的数据为：{}".format(msg.data))


if '__main__' == __name__:
    rospy.init_node("huaHua")
    sub = rospy.Subscriber('che', String, doMsg, queue_size=10)
    rospy.spin()
